<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page import="dao.*"  %>
<%@page import="entity.*"  %>
<%@page import="java.util.List"  %>
<%@page import="java.text.*"  %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE>
<html>
<head>
<meta charset="UTF-8">
<title>修改个人信息</title>

<style type="text/css">
.p{ime-mode:disabled;}/* 屏蔽输入法 */
.a{ime-mode:active}/*激活本地输入法*/

	a:link,
	a:visited{
		color: #666666;
		font:bold 20px/50% "微软雅黑";
	}
	a:hover,
	a:active{
		color:#999999;
		text-decoration:none;
	}


</style>
 <script type="text/javascript">
	function j(){
		if(confirm("是否修改？若取消，则回到个人信息管理修改页面！")){
			return true;
		}
		
		
		return false;
	}
</script>
</head>
<body>
<%--   <%	request.setCharacterEncoding("UTF-8");
	/* int cid=Integer.parseInt(request.getParameter("cid")); */
	/* String action=request.getParameter("action"); */
	List<DBGet> l=DBConnection.readOneList(Integer.parseInt(request.getParameter("cid")));
	for(DBGet d:l){
%>

	<form action="Update2.jsp" method="post" onsubmit="return j()">
	<table align="center">
		<tr><td>记录id:</td><td><input type="text" name="id" id="id" maxlength="11" size="20" class="p" value="<%=d.getId() %>" onkeyup="this.value=this.value.replace(/\D/g,'')"/></td></tr>
		<tr><td>身份证:</td><td><input type="text" name="pld" id="pld" maxlength="20" size="20" class="p" value="<%=d.getPId() %>"/></td></tr>
		<tr><td>姓名:</td><td><input type="text" name="name" id="name" maxlength="20" size="20" class="a" value="<%=d.getName() %>"/></td></tr>
		<tr><td>性别:</td><td><input type="text" name="sex" id="sex" maxlength="4" size="20" class="a" value="<%=d.getSex() %>"/></td></tr>
		<tr><td>出生日期:</td><td><input type="text" name="birthdate" maxlength="10" size="20" class="p" value="<%=d.getBirthdate() %>"/></tr>
		<tr><td></td><td><input type="submit" value="保存"></td></tr>	
	<%
	}
	
	/* request.setCharacterEncoding("UTF-8");
	String id = request.getParameter("id");
	String pld = request.getParameter("pld");
	String name = request.getParameter("name");
	String sex = request.getParameter("sex");
	String b = request.getParameter("birthdate");
	SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
	
	
	if (id != null && pld != null && name != null
			&& sex != null && sdf.parse(b) != null) {
		DBConnection.insert(Integer.parseInt(id), pld, name, sex, sdf.parse(b));
		
	} */ %>
	
	</table>
</form>  --%>

<%
	request.setCharacterEncoding("utf-8");
	List<JavaBean> l=StudentDao.readOneList(Integer.parseInt(request.getParameter("cid")));
	for(JavaBean d:l){
		pageContext.setAttribute("dd", d);
	}
%>

	<form action="Update2.jsp" method="post" onsubmit="return j()">
	<table align="center">
	<tr><td>个人照片:</td><td><a href="img.jsp?name=${dd.id}&action=img"></a>显示个人照片</td></tr>
	<tr><td>记录id:</td><td><input type="text" name="id" id="id" maxlength="11" size="20" class="p" value="${dd.id}" onkeyup="this.value=this.value.replace(/\D/g,'')"/></td></tr>
		<tr><td>身份证:</td><td><input type="text" name="pld" id="pld" maxlength="20" size="20" class="p" value="${dd.pId}"/></td></tr>
		<tr><td>姓名:</td><td><input type="text" name="name" id="name" maxlength="20" size="20" class="a" value="${dd.name}"/></td></tr>
		<tr><td>性别:</td><td><input type="text" name="sex" id="sex" maxlength="4" size="20" class="a" value="${dd.sex}"/></td></tr>
		<tr><td>出生日期:</td><td><input type="text" name="birthdate" maxlength="10" size="20" class="p" value="${dd.birthdate}"/></tr>
	
		<tr><td></td><td><input type="submit" value="保存"></td></tr>	
	</table>
	</form>


 
</body>
</html>